<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script type="text/javascript" src="script/jquery-3.6.0.min.js"></script>
  <script type="text/javascript">
    $.ajax({
      url: "Data/monster.json",
      success(resultData){
        console.log("第1次ajax请求 monster基本信息=", resultData);
        //发出第二次ajax请求
        $.ajax({
          url: `Data/monster_detail_${resultData.id}.json`,
          success(resultData) {
            console.log("第2次ajax请求 monster详细信息=", resultData);
            //$.ajax => callback hell
            //$.ajax
            //$.ajax.....
          },
          error(err) {
            console.log("出现异常=", err);
          }
        })
      },
      error(err){
        console.log("出现异常=", err);
      }
    })
  </script>
</head>
<body>
</body>
</html>
